1. Field of the Invention
This invention relates to a computer system which comprises a host computer and a secondary storage system and, in particular, to techniques of file placement optimization in the secondary storage system.
2. Description of the Related Art
Known as a computer system which comprises a host computer and a secondary storage system is a system in which hard disk units, hereinafter simply called disk units, are connected to workstations (WSs) using an operating system (OS) known as UNIX.
The art described in "The Design and Implementation of the 4.3BSD UNIX Operating System" Maruzen, published in 1991 is known as file management techniques for such a computer system.
The art will be discussed.
FIG. 24 shows the configuration of the computer system.
In the figure, numeral 1 is a host computer and numeral 2 is a secondary storage system.
In the host computer 1, numeral 20 denotes an OS and numeral 12 denotes a process of an application program (AP) executed by the user managed by the OS 20. That is, application programs executed in the host computer are managed as processes 12 by the OS 20.
In the OS 20, numeral 13 indicates file and buffer management means for managing files and buffers used to transfer data when files are accessed, numeral 15 indicates a file management table for describing information to relate logical addresses of files and directories (addresses in the OS) to corresponding local addresses (addresses in disk units), and numeral 14 indicates a directory management table for describing directory information (information to relate directory and file names to the file management table). Numeral 16 indicates a device driver for converting and controlling file access requests from the file and buffer management means 13 conforming to physical characteristics of various peripheral devices such as a secondary storage system, numeral 30 indicates file address determination means for determining the local address of an optimum disk unit for writing when a new file is written, numeral 25a indicates a disk management table for managing the usage states of disks, and numerals 21 and 22 are interface controllers for controlling communication and data transfer between the host computer and the secondary storage system. In this specification, the term "logical address" indicates a logical address for managing files in the host computer and the term "local address" indicates a local address for a secondary storage system (a disk unit) to manage files. The local address may be a logical address or a physical address. For example, in a disk unit adopted SCSI (Small Computer System Interface), SCSI disk, a logical successive number (LBA: logical block address) is used as a local address. On the other hand, in the IDE (Intelligent Device Electronics) disk etc., a physical address such as a head number, cylinder number, or sector number, which represents a physical position of storing directly is used as a local address.
Next, in the secondary storage system 2, numeral 29 indicates at least one disk unit, numeral 24 indicates a disk controller for controlling the disk units 29, and numeral 23 indicates command management means for receiving and analyzing read and write commands from the host computer, preparing disk commands appropriate to the disk unit, and sending the commands to the disk controller 24.
File access processing executed for process 12 to access an already existing file will now be described.
To access a file, the process 12 issues a file access read or write request (system call) to the OS 20.
When receiving the request, the file and buffer management means 13 in the OS 20 references the directory management table 14 to find the location of the file management table 15 from the file name of the file to be accessed. Next, it references the found file management table 15 to calculate a logical address at which read (or write) file data requested by the process exists (or is to be registered) and converts the logical address into a local address in the secondary storage system. Also, it reserves a buffer area required for data transfer.
Next, the OS 20 sends an access request to the device driver 16 with the calculated local address. When receiving the access request, the device driver 16 prepares a command conforming to the physical characteristics of the secondary storage system 2 in which the file is stored (or to be stored), and sends the command via the interface controller 21 to the secondary storage system 2.
In the secondary storage system 2, the command management means 23 receives the command via the interface controller 22, and analyzes the command. Based on the command analysis results such as the access type, access start address, and data length, the command management means 23 prepares a disk command proper to the disk unit 29 and requests the disk controller 24 to execute the command. The disk controller 24 executes the command to control the disk unit 29 for executing appropriate data transfer processing.
When the process 12 accesses an already existing file, the local address in the secondary storage system 2 at which the file is to be stored must be determined.
Then, to create a new file, new registration processing needs to be performed before file access (write) processing, as described below:
When receiving a request for writing a new file from the process 12, the file and buffer management means 13 registers a file name of the new file in the directory management table 14, reserves a management data area for the file, and registers the location in the directory management table 14. Next, while referencing the disk management table 25a, the file address determination means 30 determines an optimum address, namely, the address of such an area in which the minimum seek is performed with no useless rotational delay according to a predetermined placement algorithm in response to physical characteristic parameters such as the numbers of heads, cylinders, and sectors of disk unit preset by the user. The file address determination means 30 registers the determined address in the file management table 15 to relate it to a logical address.
This new registration processing makes it possible to access the file in a later access by normal file access processing performed by referencing both the directory management table 14 and the file management table 15.
According to the art described in "The Design and Implementation of the 4.3BSD UNIX Operating System" Maruzen, published in 1991, the physical parameters of the secondary storage system of the disk units, etc., must be preset to determine the optimum address in which a newly created file is to be stored, as described above.
On the other hand, in recent years, with demands for large capacity, high performance, and high reliability, various secondary storage systems in advanced and complicated forms have emerged, such as a disk array system in which disks are laid out like an array, and data is divided for placement on each disk unit, rather than simple connection of one or more disk units to a computer system.
Thus, the physical parameters of the secondary storage system become diversified including, not only parameters of a single disk, but also parameters of the array configuration, data distribution system, placement of redundant data calculated from data on a number of disk units to accomplish high reliability, etc., depending on the architecture of the secondary storage system. Generally, host computers and secondary storage systems are distributed separately and the parameters of a secondary storage system cannot be preset for a host computer by the manufacturer of the secondary storage system.
Thus, the parameters of the secondary storage system will be set by the user, but it is difficult for the user to set all parameters of the secondary storage system; in fact, the user may be unable to set the parameters in many cases. Consequently, file placement optimization in a complicated secondary storage system becomes difficult at the host computer; performance of the secondary storage system cannot be used efficiently.